<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <h:form id="FilteredCameraListForm">

        <p:panel header="#{myBundle.ListCameraTitle}">

            <p:dataTable id="datalist" value="#{packCameraController.items}" var="item"
                         selectionMode="single" selection="#{packCameraController.selected}"
                         rowKey="#{item.idCAMERA}"
                         paginator="true"
                         rows="10"
                         rowsPerPageTemplate="10,20,30"
                         >


                <p:column sortBy="#{item.idCAMERA}" filterBy="#{item.idCAMERA}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListCameraTitle_idCAMERA}"/>
                    </f:facet>
                    <h:outputText value="#{item.idCAMERA}"/>
                </p:column>
                <p:column sortBy="#{item.persone}" filterBy="#{item.persone}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListCameraTitle_persone}"/>
                    </f:facet>
                    <h:outputText value="#{item.persone}"/>
                </p:column>
                <p:column sortBy="#{item.iniziodisp}" filterBy="#{item.iniziodisp}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListCameraTitle_iniziodisp}"/>
                    </f:facet>
                    <h:outputText value="#{item.iniziodisp}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                </p:column>
                <p:column sortBy="#{item.finedisp}" filterBy="#{item.finedisp}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListCameraTitle_finedisp}"/>
                    </f:facet>
                    <h:outputText value="#{item.finedisp}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>
                </p:column>
                <p:column sortBy="#{item.prezzo}" filterBy="#{item.prezzo}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListCameraTitle_prezzo}"/>
                    </f:facet>
                    <h:outputText value="#{item.prezzo}"/>
                </p:column>
                <p:column sortBy="#{item.descrizione}" filterBy="#{item.descrizione}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListCameraTitle_descrizione}"/>
                    </f:facet>
                    <h:outputText value="#{item.descrizione}"/>
                </p:column>

                <p:column sortBy="#{item.idHOTEL.indirizzo.nome}" filterBy="#{item.idHOTEL.indirizzo.nome}">
                    <f:facet name="header">
                        <h:outputText value="Città"/>
                    </f:facet>
                    <h:outputText value="#{item.idHOTEL.indirizzo.nome}"/>
                </p:column>
                <p:column sortBy="#{item.idHOTEL.indirizzo.nazione}" filterBy="#{item.idHOTEL.indirizzo.nazione}">
                    <f:facet name="header">
                        <h:outputText value="Nazione"/>
                    </f:facet>
                    <h:outputText value="#{item.idHOTEL.indirizzo.nazione}"/>
                </p:column>
                <p:column sortBy="#{item.idHOTEL.stelle}" filterBy="#{item.idHOTEL.stelle}">
                    <f:facet name="header">
                        <h:outputText value="Stelle"/>
                    </f:facet>
                    <h:outputText value="#{item.idHOTEL.stelle}"/>
                </p:column>
                <p:column sortBy="#{item.idHOTEL.recapito}" filterBy="#{item.idHOTEL.recapito}">
                    <f:facet name="header">
                        <h:outputText value="Recapito"/>
                    </f:facet>
                    <h:outputText value="#{item.idHOTEL.recapito}"/>
                </p:column>
                <f:facet name="footer">
                    <div class="footer-section">
                    </div>
                </f:facet>

            </p:dataTable>

        </p:panel>

    </h:form>

</ui:composition>